//
//  PXLAppController.h
//  PXL
//
//  Created by Rachel Blackman on 8/9/07.
//  Copyright 2007 Riverdark Studios. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import "RBSplitView.h"

@class PXLPhoneHelper;
@class ImageBackgroundView;

@interface PXLAppController : NSWindowController {

    IBOutlet NSOutlineView *_pxlPackages;
    IBOutlet NSTextView *   _pxlDisplayView;
    IBOutlet NSTableView *  _pxlInstallLog;
    
    IBOutlet ImageBackgroundView *       _pxlPackageCustomView;
    IBOutlet NSTextField *  _pxlPackageTitle;
    IBOutlet NSTextField *  _pxlPackageSubtitle;
    IBOutlet NSTextField *  _pxlPackageDescription;
	IBOutlet NSButton *     _pxlPackageURLView;
    IBOutlet NSImageView *  _pxlPackageIcon;
    IBOutlet NSButton *     _pxlPackageRemoveButton;

    IBOutlet NSPanel *      _pxlWaitPanel;
    IBOutlet NSTextField *  _pxlWaitPanelLabel;
    IBOutlet NSProgressIndicator *_pxlWaitPanelBar;
    IBOutlet NSButton *     _pxlWaitPanelCancel;
    
    IBOutlet NSPanel *      _pxlPackageDetailPanel;
    IBOutlet NSImageView *  _pxlPackageDetailIcon;
    IBOutlet NSTextField *  _pxlPackageDetailName;
    IBOutlet NSTextField *  _pxlPackageDetailDescription;
    IBOutlet NSTableView *  _pxlPackageDetailFilelist;
    BOOL                    _pxlPackageDetailExpanded;
    NSRect                  _pxlPackageDetailDefaultRect;
    NSRect                  _pxlPackageDetailExpandedRect;
    IBOutlet NSButton *     _pxlPackageDetailDisclosure;
    
    NSDictionary *          _pxlInstallingPackage;
    
    IBOutlet NSWindow *     _pxlSetupWindow;
    IBOutlet NSTextField *  _pxlSetupExplanation;
    IBOutlet NSTextField *  _pxlSetupStatus;
    IBOutlet NSProgressIndicator *_pxlSetupProgress;
    IBOutlet NSProgressIndicator *_pxlSetupSpinny;
    IBOutlet NSButton *     _pxlSetupCancel;
    
    IBOutlet NSWindow *     _pxlErrorWindow;
    IBOutlet NSTextField *  _pxlErrorReason;
    
    NSURLDownload *         _pxlFirmwareDownload;
    NSURLResponse *         _pxlFirmwareDownloadResponse;
    BOOL                    _pxlFirmwareDownloading;
    long long               _pxlFirmwareBytesReceived;
    
    BOOL                    _pxlWaitSheetEnabled;
    BOOL                    _pxlFirstInstall;
    
    NSMutableArray *        _pxlInstallQueue;

    PXLPhoneHelper*         _iPhoneHelper;
}

- (IBAction) installPackage:(id)sender;
- (IBAction) removePackage:(id)sender;
- (IBAction) waitSheetCancel:(id)sender;
- (IBAction) setupWindowCancel:(id)sender;

- (IBAction) detailSheetInstall:(id)sender;
- (IBAction) detailSheetCancel:(id)sender;
- (IBAction) detailSheetExpand:(id)sender;

- (IBAction) clickedDetailUrl:(id) sender;


@end
